<!DOCTYPE html>
<html lang="en">
<head script_div=rz34IC >
    <meta charset="UTF-8">
    <title>{$seoinfo['seotitle']}-{$GLOBALS['cfg_webname']}</title>
    {if $seoinfo['keyword']}
    <meta name="keywords" content="{$seoinfo['keyword']}" />
    {/if}
    {if $seoinfo['description']}
    <meta name="description" content="{$seoinfo['description']}" />
    {/if}
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
    {Common::css('base.css,swiper.min.css,header.css,index2.css,footer2.css')}
    {Common::js('jquery.min.js,login.js.common.js,lib-flexible.js,zepto.js,swiper.min.js')}
</head>
<body id="body">
<div id="homePage">
{request "pub/header_new/default_tpl/header_new2/typeid/$typeid"}
<!-- 头部 -->

<div class="swiper-banner-container">
    <a class="item"><img src="{Common::img($destinfo['litpic'],750,500)}" alt="" /></a>
    <span class="swiper-slide-span">{$destinfo['kindname']}</span>
	{if St_Functions::is_system_app_install(6)}
    <span class="swiper-slide-count" onclick="window.open('{$cmsurl}photos/{$destinfo['pinyin']}')">
		{php $num = St_Functions::get_dest_relevant_img($destinfo['id'])}
		{if $num}
        <img src="{$cmsurl}public/images/new_swiper-slide-img.png" alt="">
        <i>{$num}</i>张照片
        {/if}
    </span>
	{/if}
</div>
<!-- banner -->
<div class="recommend" {if empty($destinfo['jieshao'])}style="padding-top:0.266667rem;"{/if}>
    {if !empty($destinfo['jieshao'])}
    <div class="recommend-hd">
        <span>
            {St_Functions::cutstr_html($destinfo['jieshao'],100)}
        </span>
        <span id="seeMore">
            <a href="javascript:;" class="recommend-hd-text" >
                阅读<br>全部
            </a>
        </span>
    </div>
    {/if}
    {st:destination action="query" flag="same" pid="$destinfo['pid']" currentid="$destinfo['id']" row="6" return="samedest"}
    {if !empty($samedest) && count($samedest)>0}
    <div class="recommend-bd">
        <div class="recommend-tagBox">
            <span>周边目的地：</span>
            {loop $samedest $next}
            {if $next['id']!=$destinfo['id']}
            <span class="recommend-tagBox-tag"><a href="{$GLOBALS['cfg_basehost']}/{$next['pinyin']}/">{$next['kindname']}</a></span>
            {/if}
            {/loop}
        </div>
    </div>
    {/if}
    {/st}
</div>

<!-- 介绍模块 -->
{st:channel action="getchannel" row="100"}
{loop $data $row}
{if $row['m_typeid']==1||$row['m_typeid']==114||$row['m_typeid']==104}
{php}$pinyin=Model_Model::all_model($row['m_typeid'],'correct');{/php}
<div class="product">
	{if $row['m_typeid']==1}
		{st:line action="query" flag="mdd" destid="$destinfo['id']" row="4" return="info"}
	{elseif $row['m_typeid']==114}
		{st:outdoor action="query" flag="mdd" destid="$destinfo['id']" row="4" return="info"}
	{elseif $row['m_typeid']==104}
		{st:ship action="query" flag="mdd" destid="$destinfo['id']" row="4" return="info"}
	{/if}
	{if $info}
    <div class="product-hd">
        <span>{$row['m_title']}</span>
    </div>
    <div class="product-main">
        <ul class="product-main-ul">
            
            {loop $info $in}
            <li>
                <a href="{$in['url']}">
                    <div class="product-main-imgBox">
                        <img src="{Common::img($in['litpic'],340,230)}" alt="">
                    </div>
                    <div class="product-main-div">
                        <span class="product-main-span">{$in['title']}</span>
                        {if !empty($in['price'])}
                            <div>{Currency_Tool::symbol()}<i>{$in['price']}</i>起</div>
                        {else}
                            <div><i>电询</i></div>
                        {/if}
                    </div>
                </a>
            </li>
            {/loop}
            {/st}
        </ul>
    </div>
    <div class="module-more-bar">
        <a class="module-more-link" href="{$cmsurl}{$pinyin}/{$destinfo['pinyin']}">查看更多</a>
    </div>
	{/if}
</div>
{/if}
{/loop}

{loop $data $row}
{if $row['m_typeid']==2||$row['m_typeid']==3||$row['m_typeid']==5||$row['m_typeid']==106||$row['m_typeid']==118}
{php}$pinyin=Model_Model::all_model($row['m_typeid'],'correct');{/php}
<div class="product">
	{if $row['m_typeid']==2}
		{st:hotel action="query" flag="mdd" destid="$destinfo['id']" row="4" return="info"}
	{elseif $row['m_typeid']==3}
		{st:car action="query" flag="recommend" destid="$destinfo['id']" row="4" return="info"}
	{elseif $row['m_typeid']==5}
		{st:spot action="query" flag="mdd" destid="$destinfo['id']" row="4" return="info"}
	{elseif $row['m_typeid']==106}
		{st:guide action="service_by_dest" destid="$destinfo['id']" row="4" return="info"}
	{elseif $row['m_typeid']==118}
		{st:techan action="query" flag="mdd" destid="$destinfo['id']" row="4" return="info"}
	{/if}
	{if $info}
    <div class="product-hd">
        <span>{$row['m_title']}</span>
    </div>
    <div class="product-main">
        <ul class="product-main-ul">
            {loop $info $in}
            <li>
                <a href="{$in['url']}">
                    <div class="product-main-imgBox">
                        <img src="{Common::img($in['litpic'],340,230)}" alt="">
                    </div>
                    <div class="product-main-div">
                        <span>{St_Functions::cutstr_html($in['title'],13)}</span>
                        {if !empty($in['price'])}
                        <div>{Currency_Tool::symbol()}<i>{$in['price']}</i>起</div>
                        {else}
                        <div><i>电询</i></div>
                        {/if}
                    </div>
                </a>
            </li>
            {/loop}
        </ul>
    </div>
    <div class="module-more-bar">
        <a class="module-more-link" href="{if $row['m_typeid']==8}{$cmsurl}visa/{$destinfo['pinyin']}{elseif $row['m_typeid']==118}{$cmsurl}techan/{$destinfo['pinyin']}{else}{$cmsurl}{$pinyin}/{$destinfo['pinyin']}{/if}">查看更多</a>
    </div>
	{/if}
</div>
{/loop}
{/if}

{loop $data $row}
{if !empty($row['m_typeid'])&&(Model_Model::all_model($row['m_typeid'],'issystem'))==0&&(Model_Model::all_model($row['m_typeid'],'maintable'))=='model_archive'}
{php}$pinyin=Model_Model::all_model($row['m_typeid'],'pinyin');{/php}
{if $row['m_isopen']==1}
<div class="product">
	{st:tongyong action="query" typeid="$row['m_typeid']" flag="mdd" destid="$destinfo['id']" row="4" return="info"}
	{if $info}
    <div class="product-hd">
        <span>{$row['m_title']}</span>
    </div>
    <div class="product-main">
        <ul class="product-main-ul">
            {loop $info $in}
            <li>
                <a href="{$in['url']}">
                    <div class="product-main-imgBox">
                        <img src="{Common::img($in['litpic'],340,230)}" alt="">
                    </div>
                    <div class="product-main-div">
                        <span>{St_Functions::cutstr_html($in['title'],13)}</span>
                        {if !empty($in['price'])}
                        <div>{Currency_Tool::symbol()}<i>{$in['price']}</i>起</div>
                        {else}
                        <div><i>电询</i></div>
                        {/if}
                    </div>
                </a>
            </li>
            {/loop}
        </ul>
    </div>
    <div class="module-more-bar">
        <a class="module-more-link" href="{$cmsurl}{$pinyin}/{$destinfo['pinyin']}">查看更多</a>
    </div>
	{/st}
	{/if}
</div>
{/if}
{/loop}
{/if}

{loop $data $row}
{if $row['m_typeid']==13}
{php}$pinyin=Model_Model::all_model($row['m_typeid'],'pinyin');{/php}
<div class="product tuan">
	{st:tuan action="query" flag="mdd" destid="$destinfo['id']" row="4" return="info"}
	{if $info}
    <div class="product-hd">
        <span>{$row['m_title']}</span>
    </div>
    <div class="product-main">
        <ul class="product-main-ul">
            {php $num=1;}
            {loop $info $in}
            <li>
                <a href="{$in['url']}">
                    <div class="product-main-activity">
                        <div class="product-main-imgBox">
                            <img src="{Common::img($in['litpic'],340,230)}" alt="">
                        </div>
                        {if $in['totalnum']>0}
                            {if $in['starttime'] > time()}
                                {php $time = $in['starttime']-time();}
                                {php $status = 1;}
                            {else}
                                {php $time = $in['endtime']-time();}
                                {php $status = 2;}
                            {/if}
                        {else}
                            {php $status = 3;}
                        {/if}
                        <div data-time="{$time}" data-num="{$num}" class="tuan-parameter {if $status==1}product-main-timeStrat{elseif $status==2}product-main-timeEnd{else}product-main-timeOver{/if}">
                            <p>
                                {if $status==1}距离开始{elseif $status==2}距离结束{else}抢光了{/if}&nbsp;&nbsp;
                                {if $in['totalnum']>0}
                                <i id="day_show{$num}"></i>天
                                <i id="hour_show{$num}"></i>时
                                <i id="minute_show{$num}"></i>分
                                <i id="second_show{$num}"></i>秒
                                {/if}
                            </p>
                        </div>
                    </div>
                    <div class="product-main-div">
                        <span>{St_Functions::cutstr_html($in['title'],13)}</span>
                        {if !empty($in['price'])}
                        <div class="product-sale">{Currency_Tool::symbol()}<i>{$in['price']}</i>起</div>
                        {else}
                        <div class="product-sale"><i>电询</i></div>
                        {/if}
                    </div>
                </a>
            </li>
            {php $num++;}
            {/loop}
        </ul>
    </div>
    <div class="module-more-bar">
        <a class="module-more-link" href="{$cmsurl}{$pinyin}/{$destinfo['pinyin']}">查看更多</a>
    </div>
	{/if}
	{/st}
</div>
{/if}
{/loop}

{loop $data $row}
{if $row['m_typeid']==11}
{php}$pinyin=Model_Model::all_model($row['m_typeid'],'pinyin');{/php}
<div class="product">
	{st:jieban action="query" flag="mdd" destid="$destinfo['id']" row="2" return="info"}
	{if $info}
    <div class="product-hd">
        <span>{$row['m_title']}</span>
    </div>
    <div class="product-main">
        <ul class="product-main-ul">
            {loop $info $in}
            <li>
                <a href="{$in['url']}">
                    <div class="product-main-imgBox">
                        <img src="{Common::img($in['litpic'],340,230)}" alt="">
                    </div>
                    <div class="product-main-div">
                        <span>{St_Functions::cutstr_html($in['title'],13)}</span>
                        <div class="product-departureTimeBox">
                            <span class="product-departureTime">
                                {if !empty($in['startdate'])}
                                    {$in['startdate']}出发
                                {/if}
                            </span>
                            <span class="product-playDay">
                                {if !empty($in['day'])}
                                <i>{$in['day']}</i>天
                                {/if}
                            </span>
                        </div>
                    </div>
                </a>
            </li>
            {/loop}
        </ul>
    </div>
    <div class="module-more-bar">
        <a class="module-more-link" href="{$cmsurl}destination">查看更多</a>
    </div>
	{/if}
	{/st}
</div>
{/if}
{/loop}

{loop $data $row}
{if $row['m_typeid']==4||$row['m_typeid']==101}
{php}$pinyin=Model_Model::all_model($row['m_typeid'],'correct');{/php}
<div class="product">
	{if $row['m_typeid']==4}
		{st:article action="query" flag="mdd_order" destid="$destinfo['id']" row="4" return="info"}
	{elseif $row['m_typeid']==101}
		{st:notes action="query" flag="mdd" destid="$destinfo['id']" row="4" return="info"}
	{/if}
	{if $info}
    <div class="product-hd">
        <span>{$row['m_title']}</span>
    </div>
    <div class="product-main">
        <ul class="product-main-ul">
            {loop $info $in}
            <li>
                <a href="{$in['url']}">
                    <div class="product-main-imgBox">
                        <img src="{Common::img($in['litpic'],340,230)}" alt="">
                    </div>
                    <div class="product-main-div">
                        <span>{St_Functions::cutstr_html($in['title'],13)}</span>
                    </div>
                </a>
            </li>
            {/loop}
        </ul>
    </div>
    <div class="module-more-bar">
        <a class="module-more-link" href="{$cmsurl}{$pinyin}/{$destinfo['pinyin']}">查看更多</a>
    </div>
	{/if}
</div>
{/if}
{/loop}
<!-- 产品模块 -->
{request "pub/code"}
{request "pub/footer/default_tpl/footer2"}
{request "pub/footmenu"}
<!-- 公用底部 -->

<a href="javascript:;" class="back-top" id="backTop"></a>

<!-- 弹出信息 -->
<div class="recommend-hd-textMore" id="recommend-hd-textMore">
    <div class="recommend-textMore-hd">
        {$destinfo['kindname']}
    </div>
    <div class="recommend-textMore-bd" id="recommend-textMore-bd">
        {$destinfo['jieshao']}
    </div>
    <div class="recommend-textMore-close" >
        <div class="recommend-textMore-closeButton" id="recommend-textMore-closeButton"></div>
    </div>
</div>

</div>
<!-- 目的地栏目首页 -->

<script>
    $(function(){
        $('.tuan .product-main-ul li').each(function(){
            var time = $(this).find('.tuan-parameter').attr('data-time');
            var num = $(this).find('.tuan-parameter').attr('data-num');
            if(time>0){
                timer(time,num);
            }else{
                timer(0)
            }
            function timer(intDiff,num){
                window.setInterval(function(){
                    var day = 0,
                        hour = 0,
                        minute = 0,
                        second = 0;//时间默认值
                    if (intDiff > 0) {
                        day = Math.floor(intDiff / (60 * 60 * 24));
                        hour = Math.floor(intDiff / (60 * 60)) - (day * 24);
                        //hour = Math.floor(intDiff / (60 * 60));
                        minute = Math.floor(intDiff / 60) - (day * 24 * 60) - (hour * 60);
                        second = Math.floor(intDiff) - (day * 24 * 60 * 60) - (hour * 60 * 60) - (minute * 60);
                    }
                    if (minute <= 9) minute = '0' + minute;
                    if (second <= 9) second = '0' + second;
                    $('#day_show'+num).html(day);
                    $('#hour_show'+num).text(hour);
                    $('#minute_show'+num).html(minute);
                    $('#second_show'+num).html(second);
                    intDiff--;
                }, 1000);
            }
        });

        //头部下拉导航
        $(".st-user-menu").on("click", function() {
            $(".header-menu-bg,.st-down-bar").show();
            $("body").addClass("preventScroll");
        });
        $(".header-menu-bg").on("click", function() {
            $(".header-menu-bg,.st-down-bar").hide();
            $("body").removeClass("preventScroll");
        });

        //返回顶部
        var backTop = document.getElementById("backTop");
        backTop.onclick = function(){
            document.documentElement.scrollTop = document.body.scrollTop = 0;
        };
        window.onscroll = function(){
            var scrollTop = document.documentElement.scrollTop || document.body.scrollTop;

            if( scrollTop > 100 )
                backTop.style.display = 'block';
            else
                backTop.style.display = 'none';
        };
        (function(){
            // 查看详情
            $("#seeMore").click(function(){
                $("#recommend-hd-textMore").addClass("recommend-hd-textMoreHide");
                $('body').css('overflow','hidden');
                $('body').css('position','fixed');
            });
            // 关闭详情
            $("#recommend-textMore-closeButton").click(function(){
                    $("#recommend-hd-textMore").removeClass("recommend-hd-textMoreHide");
                    $('body').css('overflow','visible');
                    $('body').css('position','relative');
                }
            );
        }());
    });
</script>
</body>
</html>